home *** CD-ROM | disk | FTP | other *** search
Text File | 1997-06-28 | 632 b | 31 lines | [TEXT/CWIE] |
- // GraphicsDeviceLoop.h
-
- #ifndef GraphicsDeviceLoop_h
- #define GraphicsDeviceLoop_h
-
- #ifndef GraphicsDeviceObject_h
- #include "GraphicsDeviceObject.h"
- #endif
-
- class GraphicsDeviceLoop
- {
- private:
- GDHandle device;
-
- public:
- GraphicsDeviceLoop()
- : device( GraphicsDeviceObject::First() )
- {}
-
- bool Finished() const { return device == 0; }
- bool Unfinished() const { return device != 0; }
-
- void operator++() { Assert( Unfinished() ); device = (**this).Next(); }
- void operator++(int) { operator++(); }
-
- GraphicsDeviceObject operator*() const { return device; }
- // Sorry, no operator->().
- };
-
- #endif
-